package com.yc.boottxx.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yc.boottxx.entity.Lease;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * <p>
 * 天下行租车-用车表-10 Mapper 接口
 * </p>
 *
 * @author xl
 * @since 2024-05-07
 */
public interface LeaseMapper extends BaseMapper<Lease> {


    @Select("select * from txx_lease where uid=#{uid}")
    @Results({
            @Result(id = true, property = "id", column = "id"),
            @Result(property = "car",column = "cid", one = @One(select = "com.yc.boottxx.mapper.CarMapper.queryById"))
    })
    List<Lease> queryLease(@Param("uid") Integer uid, IPage<Lease> page);
}
